#include <node.h>
#include <nan.h>

#include "flags.h"
#include "db.h"

using namespace v8;

void Flags::Init(Local<Object> exports) {
  Nan::HandleScope scope;

  Local<Object> flags = Nan::New<Object>();

  flags->Set(Nan::New("DB_AGGRESSIVE").ToLocalChecked(), Nan::New(DB_AGGRESSIVE));
  flags->Set(Nan::New("DB_ARCH_ABS").ToLocalChecked(), Nan::New(DB_ARCH_ABS));
  flags->Set(Nan::New("DB_ARCH_DATA").ToLocalChecked(), Nan::New(DB_ARCH_DATA));
  flags->Set(Nan::New("DB_ARCH_LOG").ToLocalChecked(), Nan::New(DB_ARCH_LOG));
  flags->Set(Nan::New("DB_ARCH_REMOVE").ToLocalChecked(), Nan::New(DB_ARCH_REMOVE));
  flags->Set(Nan::New("DB_AUTO_COMMIT").ToLocalChecked(), Nan::New(DB_AUTO_COMMIT));
  flags->Set(Nan::New("DB_BACKUP_CLEAN").ToLocalChecked(), Nan::New(DB_BACKUP_CLEAN));
  flags->Set(Nan::New("DB_BACKUP_FILES").ToLocalChecked(), Nan::New(DB_BACKUP_FILES));
  flags->Set(Nan::New("DB_BACKUP_NO_LOGS").ToLocalChecked(), Nan::New(DB_BACKUP_NO_LOGS));
  flags->Set(Nan::New("DB_BACKUP_SINGLE_DIR").ToLocalChecked(), Nan::New(DB_BACKUP_SINGLE_DIR));
  flags->Set(Nan::New("DB_BACKUP_UPDATE").ToLocalChecked(), Nan::New(DB_BACKUP_UPDATE));
  flags->Set(Nan::New("DB_BOOTSTRAP_HELPER").ToLocalChecked(), Nan::New(DB_BOOTSTRAP_HELPER));
  flags->Set(Nan::New("DB_CDB_ALLDB").ToLocalChecked(), Nan::New(DB_CDB_ALLDB));
  flags->Set(Nan::New("DB_CHKSUM").ToLocalChecked(), Nan::New(DB_CHKSUM));
  flags->Set(Nan::New("DB_CKP_INTERNAL").ToLocalChecked(), Nan::New(DB_CKP_INTERNAL));
  flags->Set(Nan::New("DB_CREATE").ToLocalChecked(), Nan::New(DB_CREATE));
  flags->Set(Nan::New("DB_CURSOR_BULK").ToLocalChecked(), Nan::New(DB_CURSOR_BULK));
  flags->Set(Nan::New("DB_CURSOR_TRANSIENT").ToLocalChecked(), Nan::New(DB_CURSOR_TRANSIENT));
  flags->Set(Nan::New("DB_CXX_NO_EXCEPTIONS").ToLocalChecked(), Nan::New(DB_CXX_NO_EXCEPTIONS));
  flags->Set(Nan::New("DB_DATABASE_LOCKING").ToLocalChecked(), Nan::New(DB_DATABASE_LOCKING));
  flags->Set(Nan::New("DB_DIRECT").ToLocalChecked(), Nan::New(DB_DIRECT));
  flags->Set(Nan::New("DB_DIRECT_DB").ToLocalChecked(), Nan::New(DB_DIRECT_DB));
  flags->Set(Nan::New("DB_DSYNC_DB").ToLocalChecked(), Nan::New(DB_DSYNC_DB));
  flags->Set(Nan::New("DB_DUP").ToLocalChecked(), Nan::New(DB_DUP));
  flags->Set(Nan::New("DB_DUPSORT").ToLocalChecked(), Nan::New(DB_DUPSORT));
  flags->Set(Nan::New("DB_DURABLE_UNKNOWN").ToLocalChecked(), Nan::New(DB_DURABLE_UNKNOWN));
  flags->Set(Nan::New("DB_ENCRYPT").ToLocalChecked(), Nan::New(DB_ENCRYPT));
  flags->Set(Nan::New("DB_ENCRYPT_AES").ToLocalChecked(), Nan::New(DB_ENCRYPT_AES));
  flags->Set(Nan::New("DB_EXCL").ToLocalChecked(), Nan::New(DB_EXCL));
  flags->Set(Nan::New("DB_EXTENT").ToLocalChecked(), Nan::New(DB_EXTENT));
  flags->Set(Nan::New("DB_FAILCHK").ToLocalChecked(), Nan::New(DB_FAILCHK));
  flags->Set(Nan::New("DB_FAILCHK_ISALIVE").ToLocalChecked(), Nan::New(DB_FAILCHK_ISALIVE));
  flags->Set(Nan::New("DB_FAST_STAT").ToLocalChecked(), Nan::New(DB_FAST_STAT));
  flags->Set(Nan::New("DB_FCNTL_LOCKING").ToLocalChecked(), Nan::New(DB_FCNTL_LOCKING));
  flags->Set(Nan::New("DB_FLUSH").ToLocalChecked(), Nan::New(DB_FLUSH));
  flags->Set(Nan::New("DB_FORCE").ToLocalChecked(), Nan::New(DB_FORCE));
  flags->Set(Nan::New("DB_FORCESYNC").ToLocalChecked(), Nan::New(DB_FORCESYNC));
  flags->Set(Nan::New("DB_FORCESYNCENV").ToLocalChecked(), Nan::New(DB_FORCESYNCENV));
  flags->Set(Nan::New("DB_FOREIGN_ABORT").ToLocalChecked(), Nan::New(DB_FOREIGN_ABORT));
  flags->Set(Nan::New("DB_FOREIGN_CASCADE").ToLocalChecked(), Nan::New(DB_FOREIGN_CASCADE));
  flags->Set(Nan::New("DB_FOREIGN_NULLIFY").ToLocalChecked(), Nan::New(DB_FOREIGN_NULLIFY));
  flags->Set(Nan::New("DB_FREELIST_ONLY").ToLocalChecked(), Nan::New(DB_FREELIST_ONLY));
  flags->Set(Nan::New("DB_FREE_SPACE").ToLocalChecked(), Nan::New(DB_FREE_SPACE));
  flags->Set(Nan::New("DB_GROUP_CREATOR").ToLocalChecked(), Nan::New(DB_GROUP_CREATOR));
  flags->Set(Nan::New("DB_HOTBACKUP_IN_PROGRESS").ToLocalChecked(), Nan::New(DB_HOTBACKUP_IN_PROGRESS));
  flags->Set(Nan::New("DB_IGNORE_LEASE").ToLocalChecked(), Nan::New(DB_IGNORE_LEASE));
  flags->Set(Nan::New("DB_IMMUTABLE_KEY").ToLocalChecked(), Nan::New(DB_IMMUTABLE_KEY));
  flags->Set(Nan::New("DB_INIT_CDB").ToLocalChecked(), Nan::New(DB_INIT_CDB));
  flags->Set(Nan::New("DB_INIT_LOCK").ToLocalChecked(), Nan::New(DB_INIT_LOCK));
  flags->Set(Nan::New("DB_INIT_LOG").ToLocalChecked(), Nan::New(DB_INIT_LOG));
  flags->Set(Nan::New("DB_INIT_MPOOL").ToLocalChecked(), Nan::New(DB_INIT_MPOOL));
  flags->Set(Nan::New("DB_INIT_MUTEX").ToLocalChecked(), Nan::New(DB_INIT_MUTEX));
  flags->Set(Nan::New("DB_INIT_REP").ToLocalChecked(), Nan::New(DB_INIT_REP));
  flags->Set(Nan::New("DB_INIT_TXN").ToLocalChecked(), Nan::New(DB_INIT_TXN));
  flags->Set(Nan::New("DB_INORDER").ToLocalChecked(), Nan::New(DB_INORDER));
  flags->Set(Nan::New("DB_INTERNAL_BLOB_DB").ToLocalChecked(), Nan::New(DB_INTERNAL_BLOB_DB));
  flags->Set(Nan::New("DB_INTERNAL_PERSISTENT_DB").ToLocalChecked(), Nan::New(DB_INTERNAL_PERSISTENT_DB));
  flags->Set(Nan::New("DB_INTERNAL_TEMPORARY_DB").ToLocalChecked(), Nan::New(DB_INTERNAL_TEMPORARY_DB));
  flags->Set(Nan::New("DB_JOIN_NOSORT").ToLocalChecked(), Nan::New(DB_JOIN_NOSORT));
  flags->Set(Nan::New("DB_LEGACY").ToLocalChecked(), Nan::New(DB_LEGACY));
  flags->Set(Nan::New("DB_LOCAL_SITE").ToLocalChecked(), Nan::New(DB_LOCAL_SITE));
  flags->Set(Nan::New("DB_LOCKDOWN").ToLocalChecked(), Nan::New(DB_LOCKDOWN));
  flags->Set(Nan::New("DB_LOCK_CHECK").ToLocalChecked(), Nan::New(DB_LOCK_CHECK));
  flags->Set(Nan::New("DB_LOCK_IGNORE_REC").ToLocalChecked(), Nan::New(DB_LOCK_IGNORE_REC));
  flags->Set(Nan::New("DB_LOCK_NOWAIT").ToLocalChecked(), Nan::New(DB_LOCK_NOWAIT));
  flags->Set(Nan::New("DB_LOCK_RECORD").ToLocalChecked(), Nan::New(DB_LOCK_RECORD));
  flags->Set(Nan::New("DB_LOCK_SET_TIMEOUT").ToLocalChecked(), Nan::New(DB_LOCK_SET_TIMEOUT));
  flags->Set(Nan::New("DB_LOCK_SWITCH").ToLocalChecked(), Nan::New(DB_LOCK_SWITCH));
  flags->Set(Nan::New("DB_LOCK_UPGRADE").ToLocalChecked(), Nan::New(DB_LOCK_UPGRADE));
  flags->Set(Nan::New("DB_LOG_AUTO_REMOVE").ToLocalChecked(), Nan::New(DB_LOG_AUTO_REMOVE));
  flags->Set(Nan::New("DB_LOG_CHKPNT").ToLocalChecked(), Nan::New(DB_LOG_CHKPNT));
  flags->Set(Nan::New("DB_LOG_COMMIT").ToLocalChecked(), Nan::New(DB_LOG_COMMIT));
  flags->Set(Nan::New("DB_LOG_DIRECT").ToLocalChecked(), Nan::New(DB_LOG_DIRECT));
  flags->Set(Nan::New("DB_LOG_DSYNC").ToLocalChecked(), Nan::New(DB_LOG_DSYNC));
  flags->Set(Nan::New("DB_LOG_EXT_FILE").ToLocalChecked(), Nan::New(DB_LOG_EXT_FILE));
  flags->Set(Nan::New("DB_LOG_BLOB").ToLocalChecked(), Nan::New(DB_LOG_BLOB));
  flags->Set(Nan::New("DB_LOG_IN_MEMORY").ToLocalChecked(), Nan::New(DB_LOG_IN_MEMORY));
  flags->Set(Nan::New("DB_LOG_NOCOPY").ToLocalChecked(), Nan::New(DB_LOG_NOCOPY));
  flags->Set(Nan::New("DB_LOG_NOSYNC").ToLocalChecked(), Nan::New(DB_LOG_NOSYNC));
  flags->Set(Nan::New("DB_LOG_NOT_DURABLE").ToLocalChecked(), Nan::New(DB_LOG_NOT_DURABLE));
  flags->Set(Nan::New("DB_LOG_NO_DATA").ToLocalChecked(), Nan::New(DB_LOG_NO_DATA));
  flags->Set(Nan::New("DB_LOG_VERIFY_CAF").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_CAF));
  flags->Set(Nan::New("DB_LOG_VERIFY_DBFILE").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_DBFILE));
  flags->Set(Nan::New("DB_LOG_VERIFY_ERR").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_ERR));
  flags->Set(Nan::New("DB_LOG_VERIFY_FORWARD").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_FORWARD));
  flags->Set(Nan::New("DB_LOG_VERIFY_INTERR").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_INTERR));
  flags->Set(Nan::New("DB_LOG_VERIFY_PARTIAL").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_PARTIAL));
  flags->Set(Nan::New("DB_LOG_VERIFY_VERBOSE").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_VERBOSE));
  flags->Set(Nan::New("DB_LOG_VERIFY_WARNING").ToLocalChecked(), Nan::New(DB_LOG_VERIFY_WARNING));
  flags->Set(Nan::New("DB_LOG_WRNOSYNC").ToLocalChecked(), Nan::New(DB_LOG_WRNOSYNC));
  flags->Set(Nan::New("DB_LOG_ZERO").ToLocalChecked(), Nan::New(DB_LOG_ZERO));
  flags->Set(Nan::New("DB_MPOOL_CREATE").ToLocalChecked(), Nan::New(DB_MPOOL_CREATE));
  flags->Set(Nan::New("DB_MPOOL_DIRTY").ToLocalChecked(), Nan::New(DB_MPOOL_DIRTY));
  flags->Set(Nan::New("DB_MPOOL_DISCARD").ToLocalChecked(), Nan::New(DB_MPOOL_DISCARD));
  flags->Set(Nan::New("DB_MPOOL_EDIT").ToLocalChecked(), Nan::New(DB_MPOOL_EDIT));
  flags->Set(Nan::New("DB_MPOOL_FREE").ToLocalChecked(), Nan::New(DB_MPOOL_FREE));
  flags->Set(Nan::New("DB_MPOOL_LAST").ToLocalChecked(), Nan::New(DB_MPOOL_LAST));
  flags->Set(Nan::New("DB_MPOOL_NEW").ToLocalChecked(), Nan::New(DB_MPOOL_NEW));
  flags->Set(Nan::New("DB_MPOOL_NOFILE").ToLocalChecked(), Nan::New(DB_MPOOL_NOFILE));
  flags->Set(Nan::New("DB_MPOOL_NOLOCK").ToLocalChecked(), Nan::New(DB_MPOOL_NOLOCK));
  flags->Set(Nan::New("DB_MPOOL_TRY").ToLocalChecked(), Nan::New(DB_MPOOL_TRY));
  flags->Set(Nan::New("DB_MPOOL_UNLINK").ToLocalChecked(), Nan::New(DB_MPOOL_UNLINK));
  flags->Set(Nan::New("DB_MULTIPLE").ToLocalChecked(), Nan::New(DB_MULTIPLE));
  flags->Set(Nan::New("DB_MULTIPLE_KEY").ToLocalChecked(), Nan::New(DB_MULTIPLE_KEY));
  flags->Set(Nan::New("DB_MULTIVERSION").ToLocalChecked(), Nan::New(DB_MULTIVERSION));
  flags->Set(Nan::New("DB_MUTEX_ALLOCATED").ToLocalChecked(), Nan::New(DB_MUTEX_ALLOCATED));
  flags->Set(Nan::New("DB_MUTEX_LOCKED").ToLocalChecked(), Nan::New(DB_MUTEX_LOCKED));
  flags->Set(Nan::New("DB_MUTEX_LOGICAL_LOCK").ToLocalChecked(), Nan::New(DB_MUTEX_LOGICAL_LOCK));
  flags->Set(Nan::New("DB_MUTEX_OWNER_DEAD").ToLocalChecked(), Nan::New(DB_MUTEX_OWNER_DEAD));
  flags->Set(Nan::New("DB_MUTEX_PROCESS_ONLY").ToLocalChecked(), Nan::New(DB_MUTEX_PROCESS_ONLY));
  flags->Set(Nan::New("DB_MUTEX_SELF_BLOCK").ToLocalChecked(), Nan::New(DB_MUTEX_SELF_BLOCK));
  flags->Set(Nan::New("DB_MUTEX_SHARED").ToLocalChecked(), Nan::New(DB_MUTEX_SHARED));
  flags->Set(Nan::New("DB_NOERROR").ToLocalChecked(), Nan::New(DB_NOERROR));
  flags->Set(Nan::New("DB_NOFLUSH").ToLocalChecked(), Nan::New(DB_NOFLUSH));
  flags->Set(Nan::New("DB_NOLOCKING").ToLocalChecked(), Nan::New(DB_NOLOCKING));
  flags->Set(Nan::New("DB_NOMMAP").ToLocalChecked(), Nan::New(DB_NOMMAP));
  flags->Set(Nan::New("DB_NOORDERCHK").ToLocalChecked(), Nan::New(DB_NOORDERCHK));
  flags->Set(Nan::New("DB_NOPANIC").ToLocalChecked(), Nan::New(DB_NOPANIC));
  flags->Set(Nan::New("DB_NOSYNC").ToLocalChecked(), Nan::New(DB_NOSYNC));
  flags->Set(Nan::New("DB_NO_AUTO_COMMIT").ToLocalChecked(), Nan::New(DB_NO_AUTO_COMMIT));
  flags->Set(Nan::New("DB_NO_CHECKPOINT").ToLocalChecked(), Nan::New(DB_NO_CHECKPOINT));
  flags->Set(Nan::New("DB_ODDFILESIZE").ToLocalChecked(), Nan::New(DB_ODDFILESIZE));
  flags->Set(Nan::New("DB_ORDERCHKONLY").ToLocalChecked(), Nan::New(DB_ORDERCHKONLY));
  flags->Set(Nan::New("DB_OVERWRITE").ToLocalChecked(), Nan::New(DB_OVERWRITE));
  flags->Set(Nan::New("DB_PANIC_ENVIRONMENT").ToLocalChecked(), Nan::New(DB_PANIC_ENVIRONMENT));
  flags->Set(Nan::New("DB_PRINTABLE").ToLocalChecked(), Nan::New(DB_PRINTABLE));
  flags->Set(Nan::New("DB_PRIVATE").ToLocalChecked(), Nan::New(DB_PRIVATE));
  flags->Set(Nan::New("DB_PR_PAGE").ToLocalChecked(), Nan::New(DB_PR_PAGE));
  flags->Set(Nan::New("DB_PR_RECOVERYTEST").ToLocalChecked(), Nan::New(DB_PR_RECOVERYTEST));
  flags->Set(Nan::New("DB_RDONLY").ToLocalChecked(), Nan::New(DB_RDONLY));
  flags->Set(Nan::New("DB_RDWRMASTER").ToLocalChecked(), Nan::New(DB_RDWRMASTER));
  flags->Set(Nan::New("DB_READ_COMMITTED").ToLocalChecked(), Nan::New(DB_READ_COMMITTED));
  flags->Set(Nan::New("DB_READ_UNCOMMITTED").ToLocalChecked(), Nan::New(DB_READ_UNCOMMITTED));
  flags->Set(Nan::New("DB_RECNUM").ToLocalChecked(), Nan::New(DB_RECNUM));
  flags->Set(Nan::New("DB_RECOVER").ToLocalChecked(), Nan::New(DB_RECOVER));
  flags->Set(Nan::New("DB_RECOVER_FATAL").ToLocalChecked(), Nan::New(DB_RECOVER_FATAL));
  flags->Set(Nan::New("DB_REGION_INIT").ToLocalChecked(), Nan::New(DB_REGION_INIT));
  flags->Set(Nan::New("DB_REGISTER").ToLocalChecked(), Nan::New(DB_REGISTER));
  flags->Set(Nan::New("DB_RENUMBER").ToLocalChecked(), Nan::New(DB_RENUMBER));
  flags->Set(Nan::New("DB_REPMGR_CONF_2SITE_STRICT").ToLocalChecked(), Nan::New(DB_REPMGR_CONF_2SITE_STRICT));
  flags->Set(Nan::New("DB_REPMGR_CONF_ELECTIONS").ToLocalChecked(), Nan::New(DB_REPMGR_CONF_ELECTIONS));
  flags->Set(Nan::New("DB_REPMGR_CONF_FORWARD_WRITES").ToLocalChecked(), Nan::New(DB_REPMGR_CONF_FORWARD_WRITES));
  flags->Set(Nan::New("DB_REPMGR_CONF_PREFMAS_CLIENT").ToLocalChecked(), Nan::New(DB_REPMGR_CONF_PREFMAS_CLIENT));
  flags->Set(Nan::New("DB_REPMGR_CONF_PREFMAS_MASTER").ToLocalChecked(), Nan::New(DB_REPMGR_CONF_PREFMAS_MASTER));
  flags->Set(Nan::New("DB_REPMGR_NEED_RESPONSE").ToLocalChecked(), Nan::New(DB_REPMGR_NEED_RESPONSE));
  flags->Set(Nan::New("DB_REPMGR_PEER").ToLocalChecked(), Nan::New(DB_REPMGR_PEER));
  flags->Set(Nan::New("DB_REP_ANYWHERE").ToLocalChecked(), Nan::New(DB_REP_ANYWHERE));
  flags->Set(Nan::New("DB_REP_CLIENT").ToLocalChecked(), Nan::New(DB_REP_CLIENT));
  flags->Set(Nan::New("DB_REP_CONF_AUTOINIT").ToLocalChecked(), Nan::New(DB_REP_CONF_AUTOINIT));
  flags->Set(Nan::New("DB_REP_CONF_AUTOROLLBACK").ToLocalChecked(), Nan::New(DB_REP_CONF_AUTOROLLBACK));
  flags->Set(Nan::New("DB_REP_CONF_BULK").ToLocalChecked(), Nan::New(DB_REP_CONF_BULK));
  flags->Set(Nan::New("DB_REP_CONF_DELAYCLIENT").ToLocalChecked(), Nan::New(DB_REP_CONF_DELAYCLIENT));
  flags->Set(Nan::New("DB_REP_CONF_ELECT_LOGLENGTH").ToLocalChecked(), Nan::New(DB_REP_CONF_ELECT_LOGLENGTH));
  flags->Set(Nan::New("DB_REP_CONF_INMEM").ToLocalChecked(), Nan::New(DB_REP_CONF_INMEM));
  flags->Set(Nan::New("DB_REP_CONF_LEASE").ToLocalChecked(), Nan::New(DB_REP_CONF_LEASE));
  flags->Set(Nan::New("DB_REP_CONF_NOWAIT").ToLocalChecked(), Nan::New(DB_REP_CONF_NOWAIT));
  flags->Set(Nan::New("DB_REP_ELECTION").ToLocalChecked(), Nan::New(DB_REP_ELECTION));
  flags->Set(Nan::New("DB_REP_MASTER").ToLocalChecked(), Nan::New(DB_REP_MASTER));
  flags->Set(Nan::New("DB_REP_NOBUFFER").ToLocalChecked(), Nan::New(DB_REP_NOBUFFER));
  flags->Set(Nan::New("DB_REP_PERMANENT").ToLocalChecked(), Nan::New(DB_REP_PERMANENT));
  flags->Set(Nan::New("DB_REP_REREQUEST").ToLocalChecked(), Nan::New(DB_REP_REREQUEST));
  flags->Set(Nan::New("DB_REVSPLITOFF").ToLocalChecked(), Nan::New(DB_REVSPLITOFF));
  flags->Set(Nan::New("DB_RMW").ToLocalChecked(), Nan::New(DB_RMW));
  flags->Set(Nan::New("DB_SALVAGE").ToLocalChecked(), Nan::New(DB_SALVAGE));
  flags->Set(Nan::New("DB_SA_SKIPFIRSTKEY").ToLocalChecked(), Nan::New(DB_SA_SKIPFIRSTKEY));
  flags->Set(Nan::New("DB_SA_UNKNOWNKEY").ToLocalChecked(), Nan::New(DB_SA_UNKNOWNKEY));
  flags->Set(Nan::New("DB_SEQ_DEC").ToLocalChecked(), Nan::New(DB_SEQ_DEC));
  flags->Set(Nan::New("DB_SEQ_INC").ToLocalChecked(), Nan::New(DB_SEQ_INC));
  flags->Set(Nan::New("DB_SEQ_RANGE_SET").ToLocalChecked(), Nan::New(DB_SEQ_RANGE_SET));
  flags->Set(Nan::New("DB_SEQ_WRAP").ToLocalChecked(), Nan::New(DB_SEQ_WRAP));
  flags->Set(Nan::New("DB_SEQ_WRAPPED").ToLocalChecked(), Nan::New(DB_SEQ_WRAPPED));
  flags->Set(Nan::New("DB_SET_LOCK_TIMEOUT").ToLocalChecked(), Nan::New(DB_SET_LOCK_TIMEOUT));
  flags->Set(Nan::New("DB_SET_MUTEX_FAILCHK_TIMEOUT").ToLocalChecked(), Nan::New(DB_SET_MUTEX_FAILCHK_TIMEOUT));
  flags->Set(Nan::New("DB_SET_REG_TIMEOUT").ToLocalChecked(), Nan::New(DB_SET_REG_TIMEOUT));
  flags->Set(Nan::New("DB_SET_TXN_NOW").ToLocalChecked(), Nan::New(DB_SET_TXN_NOW));
  flags->Set(Nan::New("DB_SET_TXN_TIMEOUT").ToLocalChecked(), Nan::New(DB_SET_TXN_TIMEOUT));
  flags->Set(Nan::New("DB_SHALLOW_DUP").ToLocalChecked(), Nan::New(DB_SHALLOW_DUP));
  flags->Set(Nan::New("DB_SLICED").ToLocalChecked(), Nan::New(DB_SLICED));
  flags->Set(Nan::New("DB_SNAPSHOT").ToLocalChecked(), Nan::New(DB_SNAPSHOT));
  flags->Set(Nan::New("DB_STAT_ALL").ToLocalChecked(), Nan::New(DB_STAT_ALL));
  flags->Set(Nan::New("DB_STAT_ALLOC").ToLocalChecked(), Nan::New(DB_STAT_ALLOC));
  flags->Set(Nan::New("DB_STAT_CLEAR").ToLocalChecked(), Nan::New(DB_STAT_CLEAR));
  flags->Set(Nan::New("DB_STAT_LOCK_CONF").ToLocalChecked(), Nan::New(DB_STAT_LOCK_CONF));
  flags->Set(Nan::New("DB_STAT_LOCK_LOCKERS").ToLocalChecked(), Nan::New(DB_STAT_LOCK_LOCKERS));
  flags->Set(Nan::New("DB_STAT_LOCK_OBJECTS").ToLocalChecked(), Nan::New(DB_STAT_LOCK_OBJECTS));
  flags->Set(Nan::New("DB_STAT_LOCK_PARAMS").ToLocalChecked(), Nan::New(DB_STAT_LOCK_PARAMS));
  flags->Set(Nan::New("DB_STAT_MEMP_HASH").ToLocalChecked(), Nan::New(DB_STAT_MEMP_HASH));
  flags->Set(Nan::New("DB_STAT_MEMP_NOERROR").ToLocalChecked(), Nan::New(DB_STAT_MEMP_NOERROR));
  flags->Set(Nan::New("DB_STAT_SUBSYSTEM").ToLocalChecked(), Nan::New(DB_STAT_SUBSYSTEM));
  flags->Set(Nan::New("DB_STAT_SUMMARY").ToLocalChecked(), Nan::New(DB_STAT_SUMMARY));
  flags->Set(Nan::New("DB_ST_DUPOK").ToLocalChecked(), Nan::New(DB_ST_DUPOK));
  flags->Set(Nan::New("DB_ST_DUPSET").ToLocalChecked(), Nan::New(DB_ST_DUPSET));
  flags->Set(Nan::New("DB_ST_DUPSORT").ToLocalChecked(), Nan::New(DB_ST_DUPSORT));
  flags->Set(Nan::New("DB_ST_IS_RECNO").ToLocalChecked(), Nan::New(DB_ST_IS_RECNO));
  flags->Set(Nan::New("DB_ST_OVFL_LEAF").ToLocalChecked(), Nan::New(DB_ST_OVFL_LEAF));
  flags->Set(Nan::New("DB_ST_RECNUM").ToLocalChecked(), Nan::New(DB_ST_RECNUM));
  flags->Set(Nan::New("DB_ST_RELEN").ToLocalChecked(), Nan::New(DB_ST_RELEN));
  flags->Set(Nan::New("DB_ST_TOPLEVEL").ToLocalChecked(), Nan::New(DB_ST_TOPLEVEL));
  flags->Set(Nan::New("DB_SYSTEM_MEM").ToLocalChecked(), Nan::New(DB_SYSTEM_MEM));
  flags->Set(Nan::New("DB_THREAD").ToLocalChecked(), Nan::New(DB_THREAD));
  flags->Set(Nan::New("DB_TIME_NOTGRANTED").ToLocalChecked(), Nan::New(DB_TIME_NOTGRANTED));
  flags->Set(Nan::New("DB_TRUNCATE").ToLocalChecked(), Nan::New(DB_TRUNCATE));
  flags->Set(Nan::New("DB_TXN_BULK").ToLocalChecked(), Nan::New(DB_TXN_BULK));
  flags->Set(Nan::New("DB_TXN_FAMILY").ToLocalChecked(), Nan::New(DB_TXN_FAMILY));
  flags->Set(Nan::New("DB_TXN_NOSYNC").ToLocalChecked(), Nan::New(DB_TXN_NOSYNC));
  flags->Set(Nan::New("DB_TXN_NOT_DURABLE").ToLocalChecked(), Nan::New(DB_TXN_NOT_DURABLE));
  flags->Set(Nan::New("DB_TXN_NOWAIT").ToLocalChecked(), Nan::New(DB_TXN_NOWAIT));
  flags->Set(Nan::New("DB_TXN_SNAPSHOT").ToLocalChecked(), Nan::New(DB_TXN_SNAPSHOT));
  flags->Set(Nan::New("DB_TXN_SYNC").ToLocalChecked(), Nan::New(DB_TXN_SYNC));
  flags->Set(Nan::New("DB_TXN_WAIT").ToLocalChecked(), Nan::New(DB_TXN_WAIT));
  flags->Set(Nan::New("DB_TXN_WRITE_NOSYNC").ToLocalChecked(), Nan::New(DB_TXN_WRITE_NOSYNC));
  flags->Set(Nan::New("DB_UNREF").ToLocalChecked(), Nan::New(DB_UNREF));
  flags->Set(Nan::New("DB_UPGRADE").ToLocalChecked(), Nan::New(DB_UPGRADE));
  flags->Set(Nan::New("DB_USE_ENVIRON").ToLocalChecked(), Nan::New(DB_USE_ENVIRON));
  flags->Set(Nan::New("DB_USE_ENVIRON_ROOT").ToLocalChecked(), Nan::New(DB_USE_ENVIRON_ROOT));
  flags->Set(Nan::New("DB_VERB_BACKUP").ToLocalChecked(), Nan::New(DB_VERB_BACKUP));
  flags->Set(Nan::New("DB_VERB_DEADLOCK").ToLocalChecked(), Nan::New(DB_VERB_DEADLOCK));
  flags->Set(Nan::New("DB_VERB_FILEOPS").ToLocalChecked(), Nan::New(DB_VERB_FILEOPS));
  flags->Set(Nan::New("DB_VERB_FILEOPS_ALL").ToLocalChecked(), Nan::New(DB_VERB_FILEOPS_ALL));
  flags->Set(Nan::New("DB_VERB_MVCC").ToLocalChecked(), Nan::New(DB_VERB_MVCC));
  flags->Set(Nan::New("DB_VERB_RECOVERY").ToLocalChecked(), Nan::New(DB_VERB_RECOVERY));
  flags->Set(Nan::New("DB_VERB_REGISTER").ToLocalChecked(), Nan::New(DB_VERB_REGISTER));
  flags->Set(Nan::New("DB_VERB_REPLICATION").ToLocalChecked(), Nan::New(DB_VERB_REPLICATION));
  flags->Set(Nan::New("DB_VERB_REPMGR_CONNFAIL").ToLocalChecked(), Nan::New(DB_VERB_REPMGR_CONNFAIL));
  flags->Set(Nan::New("DB_VERB_REPMGR_MISC").ToLocalChecked(), Nan::New(DB_VERB_REPMGR_MISC));
  flags->Set(Nan::New("DB_VERB_REP_ELECT").ToLocalChecked(), Nan::New(DB_VERB_REP_ELECT));
  flags->Set(Nan::New("DB_VERB_REP_LEASE").ToLocalChecked(), Nan::New(DB_VERB_REP_LEASE));
  flags->Set(Nan::New("DB_VERB_REP_MISC").ToLocalChecked(), Nan::New(DB_VERB_REP_MISC));
  flags->Set(Nan::New("DB_VERB_REP_MSGS").ToLocalChecked(), Nan::New(DB_VERB_REP_MSGS));
  flags->Set(Nan::New("DB_VERB_REP_SYNC").ToLocalChecked(), Nan::New(DB_VERB_REP_SYNC));
  flags->Set(Nan::New("DB_VERB_REP_SYSTEM").ToLocalChecked(), Nan::New(DB_VERB_REP_SYSTEM));
  flags->Set(Nan::New("DB_VERB_REP_TEST").ToLocalChecked(), Nan::New(DB_VERB_REP_TEST));
  flags->Set(Nan::New("DB_VERB_SLICE").ToLocalChecked(), Nan::New(DB_VERB_SLICE));
  flags->Set(Nan::New("DB_VERB_WAITSFOR").ToLocalChecked(), Nan::New(DB_VERB_WAITSFOR));
  flags->Set(Nan::New("DB_VERIFY").ToLocalChecked(), Nan::New(DB_VERIFY));
  flags->Set(Nan::New("DB_VERIFY_PARTITION").ToLocalChecked(), Nan::New(DB_VERIFY_PARTITION));
  flags->Set(Nan::New("DB_WRITECURSOR").ToLocalChecked(), Nan::New(DB_WRITECURSOR));
  flags->Set(Nan::New("DB_WRITELOCK").ToLocalChecked(), Nan::New(DB_WRITELOCK));
  flags->Set(Nan::New("DB_WRITEOPEN").ToLocalChecked(), Nan::New(DB_WRITEOPEN));
  flags->Set(Nan::New("DB_XA_CREATE").ToLocalChecked(), Nan::New(DB_XA_CREATE));
  flags->Set(Nan::New("DB_YIELDCPU").ToLocalChecked(), Nan::New(DB_YIELDCPU));

  exports->Set(Nan::New("Flags").ToLocalChecked(), flags);


  Local<Object> dbTypes = Nan::New<Object>();
  
  dbTypes->Set(Nan::New("DB_BTREE").ToLocalChecked(), Nan::New(DB_BTREE));
  dbTypes->Set(Nan::New("DB_HASH").ToLocalChecked(), Nan::New(DB_HASH));
  dbTypes->Set(Nan::New("DB_HEAP").ToLocalChecked(), Nan::New(DB_HEAP));
  dbTypes->Set(Nan::New("DB_RECNO").ToLocalChecked(), Nan::New(DB_RECNO));
  dbTypes->Set(Nan::New("DB_QUEUE").ToLocalChecked(), Nan::New(DB_QUEUE));
  dbTypes->Set(Nan::New("DB_UNKNOWN").ToLocalChecked(), Nan::New(DB_UNKNOWN));

  exports->Set(Nan::New("DbTypes").ToLocalChecked(), dbTypes);
}
